package device

func Checksum(data []byte) uint8 {
	return Update(0, data)
}

func Update(bcc uint8, p []byte) uint8 {
	for _, v := range p {
		bcc ^= v
	}
	return bcc
}
